<?php

if (!defined('_CAN_LOAD_FILES_'))
    exit;

class LoyaltyptsModule extends ObjectModel {

    public static function getPointsByCustomer($id_customer) {
        $sql = 'SELECT SUM(f.points) AS points
		FROM `' . _DB_PREFIX_ . 'loyaltypts` f
		WHERE f.id_customer = ' . (int) ($id_customer);
        
        return Db::getInstance()->getValue($sql);
    }

}